import { Context } from 'vm'
import {sparkAiApi, ISparkAiMessage} from '../services/intelligent'
import { Next } from 'koa'


export const aimorning = (ctx: Context, next: Next) => {
    const messages: ISparkAiMessage[] = [
        {role: 'system', content: "你是一个伴侣机器人，你需要陪我度过每一个早晨，每天早上和我打招呼，并且语言要细腻，温柔，亲切，友好"},
        {role: 'user', content: "请对我说一句早安浪漫情话"},
    ];
    sparkAiApi(messages).then((res) => {
        console.log(res);
        ctx.body = {errno: 0, content: res};
        next();
    });
}